/*
 * @Description: 带默认参数的antd组件
 * @Author: liyuhao
 * @Date: 2021-07-28 11:26:33
 * @LastEditors: liyuhao
 * @LastEditTime: 2021-07-28 13:34:10
 */
import React from 'react'
import { Input, InputProps } from 'antd'
import { TextAreaProps } from 'antd/lib/input/TextArea'

export const LimitedInput: React.FC<InputProps> = props => {
  const { children, ...inputProps } = props
  return <Input maxLength={50} {...inputProps} />
}

export const LimitedTextArea: React.FC<TextAreaProps> = props => {
  const { children, ...textAreaProps } = props
  return <Input.TextArea maxLength={5000} showCount {...textAreaProps} />
}